/*
 * TimeoutTimer.h
 *
 *  Created on: 2009-8-20
 *      Author: fanliangliang
 */

#ifndef TIMEOUT_TIMER_H_
#define TIMEOUT_TIMER_H_

#include <e32base.h>

class MTimeoutListener;

class CTimeoutTimer : public CTimer {
public:
	static CTimeoutTimer* NewL(MTimeoutListener& aListener, TPriority aPriority = EPriorityStandard);
	static CTimeoutTimer* NewLC(MTimeoutListener& aListener, TPriority aPriority = EPriorityStandard);
	virtual ~CTimeoutTimer();
	
	void After(TTimeIntervalSeconds anInterval);
	
protected:
	// from CActive
	virtual void RunL();
	
private:
	CTimeoutTimer(MTimeoutListener& aListener, TPriority aPriority);
	void ConstructL();
	
private:
	MTimeoutListener& iListener;
};

#endif /* TIMEOUT_TIMER_H_ */
